<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:85:"F:\phpstudy_pro\WWW\www.danganguanli.com\public/../wcapps/admin\view\login\login.html";i:1637897113;}*/ ?>
<!DOCTYPE html>



<html>



<head>



<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 



<title>后台管理</title>   



<link href="/static/skin/login.css" type="text/css" rel="stylesheet">  



<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">



<meta name="format-detection" content="telephone=no">



<meta name="apple-mobile-web-app-capable" content="yes">



<meta name="apple-mobile-web-app-status-bar-style" content="black">



<meta name="full-screen" content="yes">



<meta name="x5-fullscreen" content="true"> 



</head>  



<body>  



<div class="topbox">



	<div class="box">



    	<div class="top">



        	



        </div>



    </div>



</div>



<div class="clearboth"></div>



<div class="topbox2">

	<div class="box">

    	<div class="login">

			<div class="adminlogo">
				
			</div>

        	<form>
            	<div class="login_01">
                    <div class="login_01_01">
                    	<li><input type="text" name="name" id="name" value="" placeholder="账号" class="input01"></li>
                        <li><input type="password" name="pwd" id="pwd" value="" placeholder="密码" class="input01 input02"></li>
                    </div>
                    <div class="login_01_03">
                    	<input type="button" name="button" value="登录" class="input03"  onclick="return checkkk();" />
                    </div>
                </div>
            </form>

        </div>



    </div>



</div>



<div class="clearboth"></div>



<div class="topbox3">



	<div class="box">



    	<div class="bt" style="color: #000">



        	联系微信:weicheng0526



        </div>



    </div>



</div>



<script language="javascript" src='/static/js/jquery-1.10.2.min.js'></script>
<script src="/static/js/layui/layui.js" charset="utf-8"></script>
<script>
//action="/admin/login/checklogin/"
layui.use(['form'], function(){
  var form = layui.form(),layer = layui.layer;
});
function checkkk(){
	name = $("#name").val();
	pwd = $("#pwd").val();
	if(name==""){
		 layer.alert("登录名不为空");
		 return false;
	}
	if(pwd==""){
		 layer.alert("请输入登陆密码");
		 return false;
	}
	//发送登录记录
	$.ajax({
            url:'<?php echo url("admin/login/checklogin"); ?>',
            type:"POST",
            data:{name:name,pwd:pwd},
            dataType:"",
            success:function(json){
              if(json==1){ 
                window.location.href="<?php echo url('admin/index/index'); ?>";
              }else if(json==2){
                layer.alert("密码错误，请重新输入密码！",{time:1000}); 
              }else{
                layer.alert("登录失败，请联系管理员！",{time:1000});
              }

            },

            error:function(res){

              alert("AJAX错误");

            }

    });

    return false;

}



</script>



</body>  



</html>  



